#!/usr/bin/env python3
# -*- coding: utf-8 -*-

classmates=['wang','he','zhang']
def trim(a):
	while(a[0] == ' '):
		if a[0] == ' ':
			a = a[1:len(a) - 1]
	while(a[-1] == ' '):
		if a[-1] == ' ':
			a = a[0:len(a) - 2]
	return a
name = '    wangkaixuan    '
result = trim(name)

print('len(name)=',len(name))
print('len(result)=',len(result))
print('result=',result)
